package cn.practice.chat.user.feign;

import cn.practice.chat.lang.Result;
import cn.practice.chat.response.chat.GroupUserResponse;
import cn.practice.chat.response.message.MessageRecord;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @ClassName UserApiFeign
 * @Description:
 * @Author A-TAO
 * @Date 2022/11/1
 * @Version V1.0
 **/
@FeignClient(value = "user-server", contextId = "recordApiFeign")
public interface UserApiFeign {

    @PostMapping("/feign/addRecord")
    Result addRecord(@RequestBody MessageRecord record);


    @GetMapping("/feign/groupUser")
    Result<List<GroupUserResponse>> getGroupUserIds(@RequestParam("groupId") Integer groupId);
}
